Skip to main content

Robotiq::GripperStatusFlags Class

The GRIPPER STATUS byte (byte 0 of the status block).

This byte is decoded through named accessors: activated() and goToEnabled() answer single flag bits, while activationState() and objectDetection() unpack multi-bit fields into their own enums (ActivationState, ObjectDetection).

Example
 bool gripperStatusFlags(Robotiq::Gripper& gripper)
 {
  Robotiq::GripperStatus status = gripper.getStatus();
  bool activated = status.gripperStatus.activated(); // gACT flag
  bool goTo = status.gripperStatus.goToEnabled(); // gGTO flag
  {
  // motion has settled
  }
  return activated && goTo;
 }

Included Headers

#include <status.hpp>

Members

Public Operators
booloperator== (GripperStatusFlags other) const
booloperator!= (GripperStatusFlags other) const
Public Member Functions
boolactivated () const
boolgoToEnabled () const
ActivationStateactivationState () const
ObjectDetectionobjectDetection () const
uint8_traw () const
Public Static Functions
static constexpr GripperStatusFlagsfromRaw (uint8_t bits)

Synthesize a byte the gripper would have sent. More...

Public Operators

operator!=()

bool Robotiq::GripperStatusFlags::operator!=(GripperStatusFlagsother
)
inline
Returns

true if the flag bytes differ.

operator==()

bool Robotiq::GripperStatusFlags::operator==(GripperStatusFlagsother
)
inline
Returns

true if both flag bytes are identical.

Public Member Functions

activated()

bool Robotiq::GripperStatusFlags::activated ()
inline
Returns

gACT — the echo of the last-sent rACT (activation request).

activationState()

ActivationState Robotiq::GripperStatusFlags::activationState ()
inline
Returns

gSTA — where the activation handshake stands; see ActivationState.

goToEnabled()

bool Robotiq::GripperStatusFlags::goToEnabled ()
inline
Returns

gGTO — the echo of the last-sent rGTO (go-to request).

objectDetection()

ObjectDetection Robotiq::GripperStatusFlags::objectDetection ()
inline
Returns

gOBJ — whether the fingers are moving or stopped on an object; see ObjectDetection.

raw()

uint8_t Robotiq::GripperStatusFlags::raw ()
inline
Returns

The raw GRIPPER STATUS byte.

Public Static Functions

fromRaw()

constexpr GripperStatusFlags Robotiq::GripperStatusFlags::fromRaw(uint8_tbits
)
inline constexpr static

Synthesize a byte the gripper would have sent.

For simulators and for exercising status handling without hardware.

Parameters
bits

The raw GRIPPER STATUS byte.

Returns

A GripperStatusFlags wrapping bits.


The documentation for this class was generated from the following file:

  • status.hpp

Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.